
package com.zhitan.ems.app.patrol.wrapper;
import java.util.List;

import com.zhitan.ems.app.patrol.entity.PatrolEntity;
import com.zhitan.ems.app.patrol.vo.PatrolVO;
import com.zhitan.ems.common.extra.utils.BeanUtil;
import com.zhitan.ems.common.extra.utils.StringUtil;
import com.zhitan.ems.framework.core.mp.base.BaseEntityWrapper;

  /**
 * 巡检项目 包装类,返回视图层所需的字段
 * @author zhitan
 * 
 * @date 2024-11-02 14:05:23
 */
public class PatrolWrapper extends BaseEntityWrapper<PatrolEntity, PatrolVO>  {
    public static PatrolWrapper build() {
        return new PatrolWrapper();
    }
	@Override
	public PatrolVO entityVO(PatrolEntity patrol) {
		if(patrol==null) {
			return null;
		}
		PatrolVO patrolVO = BeanUtil.copy(patrol, PatrolVO.class);
		 List<String>  pointList=StringUtil.splitToList(patrol.getPoints(), ",");
		 patrolVO.setPointList(pointList);
		return patrolVO;
	}

}
